﻿@model cloudscribe.Core.Web.ViewModels.SiteUser.SetPasswordViewModel
@using cloudscribe.Core.Web
@using Microsoft.Extensions.Options
@using Microsoft.Extensions.Localization
@inject IStringLocalizer<CloudscribeCore> sr
@{
    ViewData["Title"] = sr["Set Password"];
    ViewData["BodyClass"] = "manage-section set-password";
}
<form asp-controller="Manage" asp-action="SetPassword" asp-route-returnurl="@ViewBag.ReturnUrl" method="post" class="form-horizontal" role="form">
    <h4>@sr["Set your password"]</h4>
    <p class="text-info">
        @sr["You do not have a local username/password for this site. Add a local account so you can log in without an external login."]
    </p>
    <hr />
    <div asp-validation-summary="All" class="text-danger"></div>
    <div class="form-group">
        <label asp-for="NewPassword" class="col-md-2 control-label">@sr["New Password"]</label>
        <div class="col-md-10">
            <input asp-for="NewPassword" class="form-control" />
            <span asp-validation-for="NewPassword" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">
        <label asp-for="ConfirmPassword" class="col-md-2 control-label">@sr["Confirm Password"]</label>
        <div class="col-md-10">
            <input asp-for="ConfirmPassword" class="form-control" />
            <span asp-validation-for="ConfirmPassword" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <button name="submit" type="submit" class="btn btn-default">@sr["Set Password"]</button>
        </div>
    </div>
</form>
@section Scripts {
    @{await Html.RenderPartialAsync("_UnobtrusiveValidationScriptsPartial"); }
}
